package com.cskaoyan.dbutils.resultSetHandler;

import com.cskaoyan.datasource.DruidUtils;
import org.apache.commons.dbutils.QueryRunner;
import org.apache.commons.dbutils.handlers.ScalarHandler;

import java.sql.SQLException;

/**
 * 创建日期: 2022/07/02 11:23
 *
 * @author ciggar
 */
public class ScarlarHandlerDemo {

    public static void main(String[] args) throws SQLException {

        QueryRunner queryRunner = new QueryRunner(DruidUtils.getDataSource());

        Object object = queryRunner.query("select count(*) from account", new ScalarHandler<>());

        System.out.println(object);

    }
}
